<?php 
namespace app\api\controller;

use app\api\model\Login as LoginModel;

class Login extends Base 
{
    /**
     * 登录接口
     * @return \app\api\controller\Json
     */
    public function login(){
        $login_model = new LoginModel();
        $res = $login_model->login($this->param);
        if ( $res['code'] == 0 ) {
            $res = success([ 'data' => encrypt( ['member_id' => $res['data'] ], 'member') ]);
        }
        return $this->response($res);
    }
}

?>